@import "../base/reset.less";
@import "../base/colors";
@import "../base/spacing";
@import "../utils/decorators";
@import "../utils/flex";
@import "../components/buttons";
@import "../components/link";
@import "../components/messages";
@import "./components/links-list";
@import "./components/onboarding-popup";

.window-content.start {
  overflow: auto;
  height: 100vh;
  padding: 0;
  position: initial;
  // background-image: url("beaker://start/background-image");
  // background-size: cover;
  // background-position: center;
}

.builtin-wrapper.start-wrapper {
  position: relative;
  display: block;
  width: 100%;
  background: #f0f0f0;

  .motd {
    display: flex;
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    background: #8257cf;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    font-weight: 600;
    border-radius: 2px;
    padding: 7px 15px;
    white-space: nowrap;

    &:empty {
      display: none;
    }

    > i {
      margin-right: 10px;
      font-size: 16px;
    }

    p {
      margin: 0;
    }

    .icon {
      margin-right: 12px;
    }

    .btn {
      color: inherit;

      &.cta {
        border: 1px solid #fff;
        margin: 0 12px;
        font-weight: inherit;
      }
    }
  }

  .header-actions {
    position: absolute;
    right: 15px;
    top: 10px;
  }

  .btn.help {
    font-size: 15px;

    &:hover {
      color: @blue;
    }
  }

  .subtitle-heading {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: center;

    .btn {
      color: rgba(0,0,0,.5);
    }
  }

  .search-container {
    width: 100%;
    max-width: 600px;
    margin: 100px auto 70px auto;
    padding: 15px;

    input.search {
      width: ~"calc(100% - 50px)";
      height: 40px;
      padding-left: 47px;
      border-radius: 0;
      border-radius: 4px 0 0 4px;
      border-right: 0;

      &:focus {
        box-shadow: none;
      }
    }

    i.fa-search {
      font-size: 16px;
      left: 17px;
      top: 11px;
      color: rgba(0,0,0,0.4);
    }

    .btn.search-btn {
      position: absolute;
      right: 0;
      top: 0;
      width: 50px;
      height: 40px;
      border-radius: 0 4px 4px 0;
      font-size: 20px;
      line-height: 16px;

      i.fa-arrow-right {
        -webkit-text-stroke: 2.25px @blue;
      }
    }

    .search-results {
      top: 41px;
    }

    .search-result {

      .icon {
        &.fa-search {
          position: initial;
        }
      }
    }
  }

  .dock-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    background: #f0f0f0;
  }

  .dock {
    padding: 30px 15px;

    .dock-separator {
      width: auto;
      padding: 3px 7px;
      margin-right: 25px;
      color: #bbb;
    }

    .dock-item {
      display: inline-block;
      width: auto;
      cursor: pointer;
      margin-bottom: 0;
      padding: 3px 7px;
      font-weight: 400;
      font-size: .7rem;
      text-transform: uppercase;
      letter-spacing: .15px;
      color: rgba(0,0,0,.75);

      &:not(:last-child) {
        margin-right: 25px;
      }

      &:hover {
        color: @color-text;
        background: rgba(0,0,0,.075);
        border-radius: 2px;
      }
    }
  }
}

.beaker-welcome {
  width: 410px;
  text-align: center;
  padding: 7px 26px 7px 13px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid @blue;
  color: @blue;
  border-radius: 4px;
  font-size: 13.5px;
  margin-top: 100px;
  margin-bottom: -100px;
  position: relative;

  p {
    margin: 0;
  }

  i {
    position: absolute;
    right: 8px;
    top: 10px;
    font-weight: 300;
    padding: 2px;
    cursor: pointer;

    &:hover {
      background: @blue;
      color: #fff;
    }
  }

  a {
    text-decoration: none !important;
    border-bottom: 1px dotted;
    cursor: pointer;
  }
}

.pinned-bookmarks-container {
  width: 460px;
  margin: auto;

  @media (min-width: 640px) {
    width: 580px;
  }

  @media (min-width: 740px) {
    width: 700px;
  }

  @media (min-width: 900px) {
    width: 830px;
  }

  @media (min-width: 1100px) {
    width: 950px;
  }
}

.pinned-bookmarks {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-gap: 20px;
  width: 100%;

  @media (min-width: 640px) {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  }

  @media (min-width: 740px) {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
  }

  @media (min-width: 900px) {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  }

  @media (min-width: 1100px) {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  }

  .add-pinned-btn {

    .tooltip {
      top: 25px;
    }
  }
}

.pinned-bookmark {
  width: 100px;
  height: 100px;
  background: #fff;
  text-align: center;
  font-size: .8rem;
  transition: box-shadow .05s ease;

  * {
    cursor: pointer;
  }

  &:hover {
    outline: 3px solid #ddd;

    &.sortable-ghost {
      outline: 3px dashed #ddd;
    }

    button.close-btn {
      opacity: 1;
    }
  }

  .favicon {
    width: 32px;
    height: 32px;
    margin-top: 25px;
  }

  .title {
    &:extend(.overflow-ellipsis);
    max-width: 80px;
    margin: auto;
    margin-top: 10px;
    color: fadeout(@color-text, 10%);
    font-size: .675rem;

    /*
    TODO(bgimg) restore with background images -prf
    color: #fff;
    text-shadow: 0 0 4px fadeout(black, 50%);
    -webkit-font-smoothing: antialiased;
    font-weight: 600;
    */
  }
}

.alert {
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 4px;

  &__info {
    color: #31708f;
    background-color: #d9edf7;
    border-color: #bce8f1;

    a {
      color: #31708f;
      text-decoration: underline;
    }
  }

  &__release-notes {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
  }
}

